//
//  VTAlertViewController.m
//  VTUpdateAlertDemo
//
//  Created by Vitas on 2018/8/7.
//  Copyright © 2018年 Bylongma. All rights reserved.
//

#import "VTUpdateAppAlertViewController.h"

@interface VTUpdateAppAlertViewController ()

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *tipLabel;


@end

@implementation VTUpdateAppAlertViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    self.alertView.tran
    
    [self setupUI];
    
    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapGestureAction:)];
    [self.view addGestureRecognizer:tapGesture];
    // Do any additional setup after loading the view.
}

- (void)tapGestureAction:(UITapGestureRecognizer *)gesture{
    [self.view removeFromSuperview];
    [self removeFromParentViewController];
}

- (void)setupUI {
    
    self.leftButton.layer.cornerRadius = self.leftButton.bounds.size.height*0.5;
    self.leftButton.layer.borderWidth = 1.0f;
    self.leftButton.layer.borderColor = [UIColor colorWithRed:255/255.0 green:110/255.0 blue:63/255.0 alpha:1.0].CGColor;
    self.leftButton.clipsToBounds = YES;
    self.rightButton.layer.cornerRadius = self.rightButton.bounds.size.height*0.5;
    self.rightButton.clipsToBounds = YES;
    
    if (self.titleStr.length > 0) {
        self.titleLabel.text = self.titleStr;
    }
    if (self.contentStr.length > 0) {
        self.tipLabel.text = self.contentStr;
    }
    if (self.leftBtnStr.length > 0) {
        [self.leftButton setTitle:self.leftBtnStr forState:UIControlStateNormal];
    }
    if (self.rightBtnStr) {
        [self.rightButton setTitle:self.rightBtnStr forState:UIControlStateNormal];
    }

}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
